home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / terminal / sysline-.1 / sysline- / sysline-1.1 / make.terminfo-entry < prev    next >
Encoding:
Text File  |  1996-03-13  |  1.3 KB  |  56 lines

  1. #!/bin/sh
  2.  
  3. # make referring terminfo entries, one for a status-line on the bottom line,
  4. # and one with the status-line on the top line -- bjd
  5.  
  6. how_many()
  7. {
  8.     echo -en "hardware has how many $1? " >&2
  9.     read answer
  10. }
  11.  
  12. echo >&2
  13. echo "('make.terminfo-entry >file' to write output to file)" >&2
  14. echo >&2
  15. how_many "columns"
  16. columns=$answer
  17. how_many "rows   "
  18. rows=$answer
  19. echo >&2
  20.  
  21. cat <<EOT
  22. # ${columns}x${rows} capable of displaying a status-line on the bottom line
  23. # note 1: the names "lx" and "con-unk" might have to be replaced
  24. # note 2: name carries the suffix "-s"
  25. lx|con${columns}x${rows}-s,
  26.     cols#${columns},lines#${rows},
  27.     hs,
  28.     eslok,
  29.     tsl=\E7\E[m\E[%i${rows};%p1%dH\E[1K,
  30.     fsl=\E[0K\E8,
  31.     dsl=\E7\E[${rows};1H\E[2K\E8,
  32.     is2=\E[1;$((${rows}-1))r\E[H\E[J,
  33.     csr=\E[%i%p1%d;%p2%dr,
  34.     clear=\E[$((${rows}-1));${columns}H\E[1J\E[H,
  35.     ed=\E[K,
  36.     use=con-unk,
  37.  
  38. # ${columns}x${rows} capable of displaying a status-line on the top line
  39. # note 1: the names "lx" and "con-unk" might have to be replaced
  40. # note 2: name carries the suffix "-top-s"
  41. lx|con${columns}x${rows}-top-s,
  42.     cols#${columns},lines#${rows},
  43.     hs,
  44.     eslok,
  45.     tsl=\E7\E[m\E[1;%p1%dH\E[1K,
  46.     fsl=\E[0K\E8,
  47.     dsl=\E7\E[1;1H\E[2K\E8,
  48.     is2=\E[2;${rows}r\E[2;1H\E[J,
  49.     .csr=\E[2;${rows}r,
  50.     csr=\E[%i%i%p1%d;%p2%dr,
  51.     clear=\E[2;1H\E[J,
  52.     cup=\E[%i%p1%{1}%+%d;%p2%dH,
  53.     home=\E[2;1H,
  54.     use=con-unk,
  55. EOT
  56.